:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Clear the Maven environment.
:: 
:: Author: ZHANGQ
:: Create Time: 2020-06-26
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

@ECHO OFF

IF DEFINED PATH_BEFORE_MAVEN (
    SET MAVEN_HOME=
    SET M2_HOME=
    ECHO Remove environment variables 'MAVEN_HOME' and 'M2_HOME'.

    SET PATH=%PATH_BEFORE_MAVEN%
    SET PATH_BEFORE_MAVEN=
    ECHO Recover environment variables 'PATH' from maven environment.
)

IF DEFINED PROMPT_BEFORE_MAVEN (
    SET PROMPT="%PROMPT_BEFORE_MAVEN%"
    SET PROMPT_BEFORE_MAVEN=
    ECHO Recover environment variables 'PROMPT' from maven environment.
)

IF DEFINED JAVA_ENV_SET_FROM_MAVEN (
    CALL inactivate-jdk.bat
    SET JAVA_ENV_SET_FROM_MAVEN=
)
